RedBitacoraOfertaDemandante = function(){
	return{
		windowBitacoraOfertaDemandante : function(folio){
			Ext.define("redBitacoraOfertasDemandante",{
				extend: "Ext.data.Model",
				fields: [
			         "reddemandanteofertaid",
			         "redofertaid",
			         "redofertadatoid",
			         "redofertadatopuesto",
			         "reddemandantefolio",
			         "redempresafolio",
			         "redempresarazonsocial"
	            ]
			});
			new Ext.Window({
				id: "windowBitacoraOfertaDemandante",
				modal: true,
				width: 750,
				minHeight: 250,
				autoHeight: true,
				maximizable: false,
				resizable	: false,
	        	bodyStyle: "background: #DFE8F6",
	        	items:[{
	        		xtype: "grid",
	        		id: "gridBitacoraOfertas",
	        		flex: 1,
	        		margins: "5 5 5 5",
	        		title: "Bitacora de Ofertas por Demandante",
	        		store: new Ext.data.Store({
	        			model: "redBitacoraOfertasDemandante",
	        			autoLoad:true,
	        			proxy: {
	        				type: "ajax",
        				    url: Asg.constants.CONTEXT_PATH + "/red/demandante/viewOfertasDemandante",
	        				reader: {
	        					type: "json",
	        					root: "ofertas"
	        				}
	        			},
	        			listeners: {
	        				beforeload: function(store, operation, options){
	        					if(!operation) operation = {};
	        					if(!operation.parms) operation.params = {};
	        					
	        					operation.params["redDemandanteFolio"] = folio;
	        			
	        				}
	        			}
	        		}),
	        		columns: [
        		          {header: "Empresa", dataIndex: "redempresarazonsocial", flex: 1},
        		          {header: "Puesto", dataIndex: "redofertadatopuesto", flex: 1}
		            ]
	        	}]
			}).show();
		}
	};
}();